/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.zrnecko.bowlingnumbers.entity;

import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.Range;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

/**
 *
 * @author zrnecko
 */
@Entity
@Scope(ScopeType.CONVERSATION)
public abstract class Game {
	@ManyToOne
	private Alley alley;

	private static final long serialVersionUID = 1L;
	private boolean crossLane;
	@Temporal(value = TemporalType.DATE)
	private Date date;
	@ManyToOne
	private GameBlock gameBlock;
	@ManyToOne
	private GameSet gameSet;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	private int lane;
	@ManyToOne
	private Player player;
	@Range(min = 0, max = 300)
	private int result;

	public Alley getAlley() {
		return alley;
	}

	public Date getDate() {
		return date;
	}

	public GameBlock getGameBlock() {
		return gameBlock;
	}

	public GameSet getGameSet() {
		return gameSet;
	}

	public Long getId() {
		return id;
	}

	public int getLane() {
		return lane;
	}

	public Player getPlayer() {
		return player;
	}

	public int getResult() {
		return result;
	}

	public boolean isCrossLane() {
		return crossLane;
	}

	public void setAlley(Alley alley) {
		this.alley = alley;
	}

	public void setCrossLane(boolean crossLane) {
		this.crossLane = crossLane;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public void setGameBlock(GameBlock gameBlock) {
		this.gameBlock = gameBlock;
	}

	public void setGameSet(GameSet gameSet) {
		this.gameSet = gameSet;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setLane(int lane) {
		this.lane = lane;
	}

	public void setPlayer(Player player) {
		this.player = player;
	}

	public void setResult(int result) {
		this.result = result;
	}


}
